package com.token.iot.bratterycharging.gateway.facade;

import org.springframework.beans.factory.annotation.Autowired;

import com.outstanding.framework.core.PendingException;
import com.token.iot.bratterycharging.gateway.api.CommandFacade;
import com.token.iot.bratterycharging.gateway.api.Ping;
import com.token.iot.bratterycharging.gateway.service.BratteryChargingCommandService;


/**
 * 向设备发送指令
 * @author chenzhixuan
 *
 */
public class CommandFacadeImpl implements CommandFacade{
	
	@Autowired
	private BratteryChargingCommandService service;

	@Override
	public String getICCID(String imei) throws PendingException {
		return service.getICCID(imei);
	}

	@Override
	public String getAddress(String imei) throws PendingException {
		return service.getAddress(imei);
	}

	@Override
	public String restartDevice(String imei) throws PendingException {
		return service.restartDevice(imei);
	}

	@Override
	public String getDeviceInfo(String imei) throws PendingException {
		return service.getDeviceInfo(imei);
	}

	@Override
	public String getPingInfo(String imei) throws PendingException {
		
		return service.getPingInfo(imei);
	}

	@Override
	public String getDeviceType(String imei) throws PendingException {
		
		return service.getDeviceType(imei);
	}
	
	
	/**
	 * 获取当天的PING信息
	 */
	@Override
	public Ping selectPingByImei(String imei) throws PendingException{
		return service.selectPingByImei(imei);
	}
	
	
	
}
